package com.javaweb.Dao;
import com.javaweb.entity.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;

@Repository
@Slf4j
public class UserDao {
    @Autowired
//    private Connection connection;
//    public int selectCount() throws SQLException {
//        log.info("执行UserDAO中的selectCount") ;
//        String sql="select count(*) from t_user";
//        ResultSet resultSet=connection.prepareStatement(sql).executeQuery();
//        int count=0;
//        if (resultSet.next()){
//            count=resultSet.getInt(1);
//        }
//        return count;
//    }
 public int selectCount() {
     log.info("select count.") ;
     return 0 ;
 }
}
